package com.jack.MainXiangDuiXiang;

public class MianXiangDuiXiang_02 {
    private String name;
    private int age;
    private char sex;

    MianXiangDuiXiang_02(){
        //this("jack",25,'男');
    }
    MianXiangDuiXiang_02(String name,int age,char sex){
        this.name = name;
        this.age = age;
        this.sex = sex;
    }


    public void setName(String name){
        this.name = name;
    }

    public String getName(){
        return this.name;
    }

    public static void main(String[] args) {
        MianXiangDuiXiang_02 p1 = new MianXiangDuiXiang_02();
        System.out.println("name:"+p1.name+"  age:"+p1.age+"  char:"+p1.sex);
        MianXiangDuiXiang_02 p2 = new MianXiangDuiXiang_02("rose",20,'女');
        System.out.println("name:"+p2.name+"  age:"+p2.age+"  char:"+p2.sex);
    }

}
